<style>
	.mpm-list-ico2 {
		color: #999;
		background: #fff;
		display: inline-block;
		padding: 2px;
		line-height: 12px;
		border: 1px solid #ccc;
	}
	.under-line {
		text-decoration: underline;
		color: rgb(41, 158, 236);
	}
</style>
<div class="panel">
  <div class="panel-body">
    <div class="col-lg-12">
      <div class="col-lg-2-4">
        <input type="text" class="form-control" placeholder="产品名称" ng-model="searchform.name">
      </div>
      <div class="col-lg-2-4">
        <ui-select ng-model="searchform.place_code" theme="bootstrap">
          <ui-select-match placeholder="请选择景区">{{$select.selected.name}}</ui-select-match>
          <ui-select-choices repeat="item.code as item in viewarr | filter: $select.search">
            <span ng-bind-html="item.name | highlight: $select.search"></span>
            <span ng-show="item.code">({{item.code}})</span>
          </ui-select-choices>
        </ui-select>
      </div>
    </div>
    <div class="col-lg-12 mt10">
      <div class="col-lg-2-4">
        <input type="text" class="form-control" placeholder="产品编号" ng-model="searchform.code">
      </div>
      <div class="col-lg-2-4">
        <ui-select ng-model="searchform.sale_category" theme="bootstrap">
          <ui-select-match placeholder="产品分类">{{$select.selected.label}}</ui-select-match>
          <ui-select-choices repeat="item.value as item in dictbytypelist | filter: $select.search">
            <span ng-bind-html="item.label | highlight: $select.search"></span>
          </ui-select-choices>
        </ui-select>
      </div>
      <div class="col-lg-2-4">
        <ui-select ng-model="searchform.channel_code" theme="bootstrap">
          <ui-select-match placeholder="请选择渠道">{{$select.selected.name}}</ui-select-match>
          <ui-select-choices repeat="item.code as item in channel_list | filter: $select.search">
            <span ng-bind-html="item.name | highlight: $select.search"></span>
          </ui-select-choices>
        </ui-select>
	  </div>
	  <div class="col-lg-2">
		<button type="submit" class="btn btn-info" ng-click="load(1)" style="width: 70%">查询</button>
	  </div>
    </div>
  </div>

  <div style="padding: 0px 15px;"> <div  class="line b-b"></div> </div>
  <div style="padding: 0px 15px;">
	
	  <b style="font-size: 18px">查询结果</b>&nbsp;&nbsp;&nbsp;&nbsp;
	  <span class="text-muted">共 <b>{{totalItems || '0'}}</b> 个供应商</span>
	
  </div>
  
  <!-- 网络太差, 画圈等 -->
  <h3 class="col-sm-12 text-center" ng-show="searchform.loading">
    <span ng-show="companylist.length == 0"><i class="fa fa-coffee"/> 无公开销售产品</span>
    <i class="fa fa-spin fa-spinner hide show inline" ng-show="companylist.length != 0"></i>
  </h3>

  <div class="panel panel-info" ng-show="!searchform.loading" ng-repeat="company in companylist">
    <div class="panel-heading" style="font-size: 16px">
      供应商：{{company.create_company_name}}<small class="text-muted">(编号：{{company.create_company_code}})</small>
      <span class="pull-right"><button type="button" class="btn btn-info btn-xs" ng-click="apply(company)">申请分销商</button></span>
    </div>
    <table class="table table-bordered">
      <thead>
        <tr>
          <th class="col-md-2 text-center">产品信息</th>
          <th class="col-md-1 text-center">产品分类</th>
          <th class="col-md-1 text-center">门市价</th>
          <th class="col-md-1 text-center">指导价</th>
        </tr>
      </thead>
      <tbody>
        <tr ng-repeat="info in company.company_sale">
          <td>{{info.name}}({{info.code}})</td>
          <td class="text-center">{{info.sale_category_name}}</td>
          <td class="text-center">{{info.market_price}}</td>
          <td class="text-center">{{info.guide_price}}</td>
        </tr>
      </tbody>
    </table>
  </div>
  <div class="text-right">
	  <pagination total-items="totalItems" ng-model="currentPage" ng-change="load(currentPage)" previous-text="上一页" 
	   next-text="下一页" first-text="首页" last-text="尾页" max-size="5" boundary-links="true" rotate="false" 
	   items-per-page="itemsPerPage" class="m-t-none m-b">
      </pagination>
  </div>
  
</div>